package com.ywjg.controller.jsonp;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.ywjg.model.CheckCompany;
import com.ywjg.serviceimp.CheckCompanyService;

@RestController
@RequestMapping(value = "android/")
public class CheckCompanyControllerAndroid {

	@Autowired
	CheckCompanyService checkCompanyService;

	@RequestMapping(value = "checkCompany")
	private CheckCompany checkCompany(int appUserId, String checkName, String checkBusinessLicence,
			String checkIdCard) {
		CheckCompany checkCompany = new CheckCompany();
		checkCompany.setAppUserId(appUserId);
		checkCompany.setCheckName(checkName);
		checkCompany.setCheckIdCard(checkIdCard);
		checkCompany.setCheckBusinessLicence(checkBusinessLicence);
		CheckCompany savedCheckCompany = checkCompanyService.addCompanyInf(checkCompany);
		return savedCheckCompany;
	}

	@RequestMapping(value = "getCompanyInf")
	private CheckCompany getCompanyInf(Integer user_id) {
		CheckCompany checkCompanyInf = checkCompanyService.getCheckCompanyInf(user_id);
		return checkCompanyInf;
	}

	@RequestMapping(value = "upDateCompanyInf")
	private CheckCompany upDateCompanyInf(CheckCompany checkCompany) {
		CheckCompany upLoadCompanyInf = checkCompanyService.upDateCompanyInf(checkCompany);
		return upLoadCompanyInf;
	}

}
